#!/usr/bin/env python
# -*- encoding:utf-8 -*-
import platform
import subprocess
import os
sys = platform.system()
def find(path, re):
	if "Linux" == sys:
		cmd = 'find ' + path + ' -name \"' + re + '\"'
		return os.popen(cmd)
	elif "Windows" == sys:
		cmd = 'cmd.exe /C for /r ' + path + ' %i in (\"*' + re + '\") do @echo %i'
		p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
		return p.stdout.readlines()
		pass

def cp(target, to):
	if "Linux" == sys:
		cmd = "cp " + target + " " + to
		#print(cmd)
		os.system(cmd)
		pass
	elif "Windows" == sys:
		cmd = 'cmd.exe /C copy ' + target + ' ' + to
		subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
		pass
	f = os.path.split(target)[1]
	print("copy " + f +"	to " + to)
if __name__ == "__main__":
	popen("")
